import * as THREE from 'three';
const model = new THREE.Group();
const createSphereGeometry = function(R,color){
    const geometry = new THREE.SphereGeometry(R);
    const material = new THREE.MeshBasicMaterial( { color } );
	const sphere = new THREE.Mesh( geometry, material );
    return sphere
}
const Amesh = createSphereGeometry(2,0x0000ff)
const A = new THREE.Vector3(30,0,0)
Amesh.position.copy(A)

// 创建一个四元素对象
const quaternion = new THREE.Quaternion();
quaternion.setFromAxisAngle( new THREE.Vector3( 0, 0, 1 ), Math.PI / 3 );
// A点绕着Z轴旋转90度
const B = A.clone().applyQuaternion(quaternion)

// 创建一个Bmesh
const Bmesh = createSphereGeometry(2,0xff0000)
Bmesh.position.copy(B)
model.add(Amesh,Bmesh)

export default {model};